
$(function(){
	
	
	 $("#save").click(function(){
		 $("#form").ajaxSubmit(function () {
			 $.Zebra_Dialog('<div class="prompt"><div class="success-icon"></div><div class="success-title">导入成功!</div></div>', {
	                'title': '提示',
	                'buttons' : [ {
						caption : '确定',
						callback : function() {
							window.location.href='/paperManager/papers';
						}
					} ]
	            });
         });
	
	 });
});
function getValue(value){
	if(value.substr(value.length-4)!=".txt"){
		 $.Zebra_Dialog(
					'<div class="prompt"><div class="warning-icon"></div><div class="warning-title">上传文件格式应为txt文件，请重新选择</div></div>',
					{
						'title' : '提示',
						'buttons' : [ {
							caption : '确定',
							callback : function() {
								$('.spare-add-input').val("");
							}
						} ]
					});
	}
}
function zebra_Dialog_warning(mesg){
	 $.Zebra_Dialog(
				'<div class="prompt"><div class="warning-icon"></div><div class="warning-title">'+mesg+'</div></div>',
				{
					'title' : '提示',
					'buttons' : [ '确定' ]
				});
}
function zebra_Dialog_success(mesg){
	$.Zebra_Dialog(
			'<div class="prompt"><div class="success-icon"></div><div class="success-title">'+mesg+'</div></div>',
			{
				'title' : '提示',
				'buttons' : [ '确定' ]
			});
}	